#ifndef _SKIN_MODE_H_
#define _SKIN_MODE_H_

class TiXmlNode;

class CSkinMode
{
public:
	CSkinMode()
	{
		m_bSet = FALSE;
	}

	BOOL LoadMode(TiXmlNode * pNode);

	CString m_strModeName;
	BOOL m_bSet;

	class MODE_ELEMENT
	{
	public:
		MODE_ELEMENT()
		{
			m_sizeResizeOffset.cx = 0;
			m_sizeResizeOffset.cy = 0;
			
			m_sizeSizeTo.cx = -1;
			m_sizeSizeTo.cy = -1;

			m_sizeSrcImageMoveOffset.cx = 0;
			m_sizeSrcImageMoveOffset.cy = 0;

			m_sizeSrcImageSizeOffset.cx = 0;
			m_sizeSrcImageSizeOffset.cy = 0;

			m_bUpdateEnable_Visible = FALSE;

			m_bCXVaraible = FALSE;
			m_bCXFixed = FALSE;
			m_bCYVaraible = FALSE;
			m_bCYFixed = FALSE;
			
			m_bVisible = FALSE;
			m_bOwnerdraw = FALSE ;
		}

		const MODE_ELEMENT & operator=(const MODE_ELEMENT & element)
		{
			strName = element.strName;
			
			m_sizeResizeOffset = element.m_sizeResizeOffset;			
			m_sizeSizeTo = element.m_sizeSizeTo;

			m_sizeSrcImageMoveOffset = element.m_sizeSrcImageMoveOffset;
			m_sizeSrcImageSizeOffset = element.m_sizeSrcImageSizeOffset;

			m_bUpdateEnable_Visible = element.m_bUpdateEnable_Visible;

			m_bCXVaraible = element.m_bCXVaraible;
			m_bCYVaraible = element.m_bCYVaraible;
			m_bCXFixed = element.m_bCXFixed;
			m_bCYFixed = element.m_bCYFixed;

			m_bVisible = element.m_bVisible;
			m_bOwnerdraw = element.m_bOwnerdraw;

			return *this;
		}

		CString strName;		
		
		CSize m_sizeResizeOffset;
		CSize m_sizeSizeTo;
	
		CSize m_sizeSrcImageMoveOffset;
		CSize m_sizeSrcImageSizeOffset;

		BOOL m_bCXVaraible;
		BOOL m_bCYVaraible;
		BOOL m_bCXFixed;
		BOOL m_bCYFixed; 

		BOOL m_bUpdateEnable_Visible;

		BOOL m_bVisible;
		BOOL m_bOwnerdraw;
	};

	CArray<MODE_ELEMENT, const MODE_ELEMENT&> m_arrMODE_ELEMENT;
};

#endif